export function prettyBytes(bytes) {
    let units = ["B", "KB", "MB", "GB", "PB"];
    let i = 0;
    while (bytes > 1024) {
        bytes /= 1024;
        i++;
    }
    let unit = units[i];
    return bytes.toFixed(1) + " " + unit;
}